home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Best of MacTutor - S…e Code for Volumes 1 to 5
/
The Best of MacTutor - Source Code for Volume 1-5 (Wayzata Technology)(6031)(1990).bin
/
Source Code
/
#51 (Dec 89)
/
LISP sources
/
listing 04
< prev
next >
Wrap
Text File
|
1988-10-23
|
343b
|
24 lines
Welcome to Allegro CL Version 1.2!
?
TOWEROFHANOI
NIL
EXIST
HANOI
MOVEDISK
MOVETOWER
ADDFIRST
GETANDREMOVEFIRST
? (setf toh (oneOf towerOfHanoi))
#<Object #252, a TOWEROFHANOI>
? (ask toh (Hanoi))
Please type the number of disks in the tower: 3
tower of Hanoï for 3 disks.
1 -> 3 A
1 -> 2 B
3 -> 2 A
1 -> 3 C
2 -> 1 A
2 -> 3 B
1 -> 3 A
NIL
?